 package com.gmrz.uaf.protocol.v1.schema;
 
 import com.gmrz.uaf.common.Constants;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;
 
 public class MatchCriteria
 {
 
   @SerializedName("aaid")
   @Expose
   private List<AAID> aaid;
 
   @SerializedName("vendorID")
   @Expose
   private List<String> vendorID;
 
   @SerializedName("keyIDs")
   @Expose
   private List<KeyID> keyIDList;
 
   @SerializedName("userVerification")
   @Expose
   private Long userVerification = null;
 
   @SerializedName("keyProtection")
   @Expose
   private Integer keyProtection = null;
 
   @SerializedName("matcherProtection")
   @Expose
   private Integer matcherProtection = null;
 
   @SerializedName("attachmentHint")
   @Expose
   private Long attachmentHint = null;
 
   @SerializedName("tcDisplay")
   @Expose
   private Integer tcDisplay = null;
 
   @SerializedName("authenticationAlgorithms")
   @Expose
   private List<Integer> authenticationAlgorithms;
 
   @SerializedName("assertionSchemes")
   @Expose
   private List<String> assertionSchemes;
 
   @SerializedName("attestationTypes")
   @Expose
   private List<Integer> attestationTypes;
 
   @SerializedName("authenticatorVersion")
   @Expose
   private Integer authenticatorVersion = null;

   @SerializedName("exts")
   @Expose
   private List<Extension> extensions;

   /**
    * UAP远程认证器扩展
    */
   @SerializedName("attachments")
   @Expose
   private List<AuthenticatorAttachment> attachments;

   public List<AuthenticatorAttachment> getAttachments() {
     return attachments;
   }

   public void setAttachments(List<AuthenticatorAttachment> attachments) {
     this.attachments = attachments;
   }

   public List<AAID> getAAID() {
     return this.aaid;
   }
 
   public void setAAID(List<AAID> aAID) {
     this.aaid = aAID;
   }
 
   public MatchCriteria withAAID(List<AAID> aAID) {
     this.aaid = aAID;
     return this;
   }
 
   public List<String> getVendorID() {
     return this.vendorID;
   }
 
   public void setVendorID(List<String> vendorID) {
     this.vendorID = vendorID;
   }
 
   public List<KeyID> getKeyIDList() {
     return this.keyIDList;
   }
 
   public void setKeyIDList(List<KeyID> keyIDList) {
     this.keyIDList = keyIDList;
   }
 
   public MatchCriteria withKeyIDList(List<KeyID> keyIDList) {
     this.keyIDList = keyIDList;
     return this;
   }
 
   public Long getUserVerification() {
     return this.userVerification;
   }
 
   public void setUserVerification(long userVerification)
   {
     this.userVerification = Long.valueOf(userVerification);
   }
 
   public MatchCriteria withAuthenticationFactor(long userVerification) {
     this.userVerification = Long.valueOf(userVerification);
     return this;
   }
 
   public Integer getKeyProtection() {
     return this.keyProtection;
   }
 
   public List<Constants.KeyProtection> getKeyProtectionAsList() {
     return Constants.KeyProtection.forValue(this.keyProtection.intValue());
   }
 
   public void setKeyProtection(int keyProtection) {
     this.keyProtection = Integer.valueOf(keyProtection);
   }
 
   public MatchCriteria withKeyProtection(int keyProtection) {
     this.keyProtection = Integer.valueOf(keyProtection);
     return this;
   }
 
   public Integer getMatcherProtection() {
     return this.matcherProtection;
   }
 
   public List<Constants.MatcherProtection> getMatcherProtectionAsList() {
     return Constants.MatcherProtection.forValue(this.matcherProtection.intValue());
   }
 
   public void setMatcherProtection(int matcherProtection) {
     this.matcherProtection = Integer.valueOf(matcherProtection);
   }
 
   public MatchCriteria withMatcherProtection(int matcherProtection) {
     this.matcherProtection = Integer.valueOf(matcherProtection);
     return this;
   }
 
   public Long getAttachment() {
     return this.attachmentHint;
   }
 
   public List<Constants.AttachmentHint> getAttachmentAsList() {
     return Constants.AttachmentHint.forValue(this.attachmentHint.longValue());
   }
 
   public void setAttachment(long attachmentHint) {
     this.attachmentHint = Long.valueOf(attachmentHint);
   }
 
   public MatchCriteria withAttachment(long attachmentHint) {
     this.attachmentHint = Long.valueOf(attachmentHint);
     return this;
   }
 
   public Integer getAuthenticatorVersion() {
     return this.authenticatorVersion;
   }
 
   public void setAuthenticatorVersion(int authenticatorVersion) {
     this.authenticatorVersion = Integer.valueOf(authenticatorVersion);
   }
 
   public MatchCriteria withAuthenticatorVersion(int authenticatorVersion) {
     this.authenticatorVersion = Integer.valueOf(authenticatorVersion);
     return this;
   }
 
   public Integer getTcDisplay() {
     return this.tcDisplay;
   }
 
   public List<Constants.SecureDisplay> getTcDisplayAsList() {
     return Constants.SecureDisplay.forValue(this.tcDisplay.intValue());
   }
 
   public void setTcDisplay(int tcDisplay) {
     this.tcDisplay = Integer.valueOf(tcDisplay);
   }
 
   public MatchCriteria withTcDisplay(int tcDisplay) {
     this.tcDisplay = Integer.valueOf(tcDisplay);
     return this;
   }
 
   public List<Integer> getSupportedAuthAlgs()
   {
     return this.authenticationAlgorithms;
   }
 
   public void setSupportedAuthAlgs(List<Integer> supportedAuthAlgs) {
     this.authenticationAlgorithms = supportedAuthAlgs;
   }
 
   public List<Integer> getSupportedAuthAlgsAsList() {
     return this.authenticationAlgorithms;
   }
 
   public List<Constants.AssertionScheme> getSupportedAssertionSchemesAsList()
   {
     List schemes = null;
     for (String s : this.assertionSchemes) {
       schemes = new ArrayList();
       schemes.add(Constants.AssertionScheme.forName(s));
     }
     return schemes;
   }
 
   public List<String> getSupportedSchemes() {
     return this.assertionSchemes;
   }
 
   public void setSupportedSchemes(List<String> assertionSchemes) {
     this.assertionSchemes = assertionSchemes;
   }
 
   public MatchCriteria withSupportedSchemes(List<String> assertionSchemes) {
     this.assertionSchemes = assertionSchemes;
     return this;
   }
 
   public List<Integer> getPreferredAttestationTypes() {
     return this.attestationTypes;
   }
 
   public void setPreferredAttestationTypes(List<Integer> attestationTypes) {
     this.attestationTypes = attestationTypes;
   }
 
   public List<Constants.AttestationType> getAttestationtypesAsList() {
     List t = null;
     for (Integer i : this.attestationTypes) {
       t = new ArrayList();
       t.add(Constants.AttestationType.forValue(i.intValue()));
     }
     return t;
   }
 
   public List<Extension> getExtensions() {
     return this.extensions;
   }
 
   public void setExtensions(List<Extension> extensions) {
     this.extensions = extensions;
   }
 
   public MatchCriteria withExtensions(List<Extension> extensions) {
     this.extensions = extensions;
     return this;
   }
 }
